package com.educate.common.exception;


import com.educate.common.api.IErrorCode;

/**
 * @author yjj
 * @Description 自定义API异常
 * @createTime 2021/09/06
 */
public class DefinitionException extends RuntimeException {
    private IErrorCode errorCode;

    public DefinitionException(IErrorCode errorCode) {
        super(errorCode.getMsg());
        this.errorCode = errorCode;
    }

    public DefinitionException(String message) {
        super(message);
    }


    public DefinitionException(Throwable cause) {
        super(cause);
    }

    public DefinitionException(String message, Throwable cause) {
        super(message, cause);
    }

    public IErrorCode getErrorCode() {
        return errorCode;
    }


}
